package com.mars.boss.weixin.service;

import java.util.List;

import com.mars.base.service.IService;
import com.mars.boss.weixin.entity.WxAgRelevancy;
import com.mars.boss.weixin.entity.WxArticle;
import com.mars.boss.weixin.entity.WxArticleGroup;

public interface WxArticleGroupService extends IService<WxArticleGroup, Long> {
	
	/**
	 * 创建图文组，并加图文加入到图文组
	 * @param entity
	 * @param articleIds
	 * @return
	 */
	public Integer insertArticleGroup(WxArticleGroup entity, Long[] articleIds) ;
	
	/**
	 * 修改图文组信息，并修改关联图文
	 * @param entity
	 * @param articleIds
	 * @return
	 */
	public Integer updateArticleGroup(WxArticleGroup entity, Long[] articleIds) ;
	
	/**
	 * 获取图文组信息并加载图文(多个)
	 * @param id
	 * @return
	 */
	public WxArticleGroup getArticleGroupAndArticles(Long id) ;
	
	/**
	 * 添加图文到图文组
	 * @param list 图文与多图文关联关系对象
	 * @return
	 */
	public Integer addArticleList(List<WxAgRelevancy> list) ;
	
	/**
	 * 根据多图文ID一对多查询图文信息
	 * @param id
	 * @return
	 */
	public List<WxArticle> getArticles(Long id) ;
	
	/**
	 * 根据多图文ID删除
	 * @param id
	 * @return
	 */
	public Integer deleteByArticleGroupId(Long id) ;
	
	public List<WxArticleGroup> combobox() ;
	
}
